package com.yjkf.zh.admin.service;

import com.yjkf.zh.admin.model.SysUser;
import com.yjkf.zh.admin.model.SysUserDevice;
import com.yjkf.zh.core.page.PageRequest;
import com.yjkf.zh.core.page.PageResult;
import com.yjkf.zh.core.service.CurdService;

import java.util.List;

public interface SysUserDeviceService extends CurdService<SysUserDevice> {
    PageResult findPage2(PageRequest pageRequest, Long userId);

   // List<SysUserDevice> findByUserId(Long id,Long userId);
    List<SysUserDevice> findByUserId(Long userId);
    int saveOrUpdate(SysUserDevice sysUserDevice,Long id);
    List<SysUserDevice> findByIdForUser(Long id, Long userId);

    List<SysUserDevice> queryDevices(Long userId);

    List<SysUserDevice> findDeviceTree(String deviceName,Long userId);

    SysUserDevice findForParentDeviceId(Long parentDeviceId);

    List<SysUserDevice> findListForParentDeviceId(Long parentDeviceId);

    int deleteUserDevices(List<SysUserDevice> records,Long userId);

    List<SysUser> getUserForIdent(String deviceIdent,Long userId);

    int upUserForDevice(List<SysUser> sysUserList,Long selfId);
}
